﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

#include <QDebug>
#include <QButtonGroup>
#include <QMessageBox>

#include "OpcUA/opcua.h"
#include "OpcUA/opcua_qthread.h"

#include "DisplayWidget/homepage.h"
#include "DisplayWidget/flowchart.h"
#include "DisplayWidget/setpage.h"
#include "DisplayWidget/temperaturepage.h"
#include "DisplayWidget/mkspage.h"
#include "DisplayWidget/valvepage.h"
#include "DisplayWidget/changepage.h"
#include "DisplayWidget/datapage.h"
#include "DisplayWidget/errorpage.h"


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:

    void on_pushButton_HomePage_clicked();

    void on_pushButton_SetPage_clicked();

    void on_pushButton_Temperature_clicked();

    void on_pushButton_MKSpage_clicked();

    void on_pushButton_ValvePage_clicked();

    void on_pushButton_ChangePage_clicked();

    void on_pushButton_DataPage_clicked();

    void on_pushButton_Flowchart_clicked();

    void onLogOutput(QString log);

    void on_opcUAInitFinished(bool success);

    void on_pushButton_ErrorPage_clicked();

private:
    Ui::MainWindow *ui;

    OpcUA * my_OpcUA;
    OpcUA_QThread * my_OpcUA_QThread;

    HomePage * my_homePage;
    FlowChart * my_flowchart;
    SetPage * my_setPage;
    TemperaturePage * my_temperaturePage;
    MKSPage * my_mksPage;
    ValvePage * my_valvePage;
    ChangePage * my_changePage;
    DataPage * my_dataPage;
    ErrorPage * my_errorPage;
};
#endif // MAINWINDOW_H
